#include "include/env.h"
#include "include/render.h"
#include <kernel.h>
#include <types.h>

void 
env_render(int x, int y, int n)
{
	if(n > 4)
		return;
	if(n < 1)
		return;
			
	env_t *e = &envs[n];

	render_draw_rect_fill(0, 0, x, 16, 0x444444);

	render_draw_rect_fill(8+(n-1)*16, 0, 18+(n-1)*16, 16, 0x666666);
	render_write_text(8, "1 2 3 4", 0xFFFFFF, 10, 10);
	
	render_draw_rect_bordered(90, 1, 320, 14, 1, 0x666666, 0x444444);
	
	render_write_text(8, e->cmd, 0xFFFFFF, 91, 10);

	
	render_draw_rect_fill(0, 16, x, y, 0xCC1100);
	
	
	render_write_text(8, NAME " " RELEASE_NAME " (rev " REVISION ", arch " ARCH ")", 0xFFFFFF, x - 350, y - 18);
}
